package drp.snowbell.part;

import drp.snowbell.annotation.APart;
import drp.snowbell.annotation.AProperty;

/**
 * 指配技能.assignedId可能是User的id,也可能是Group的Id,也有可能是Role的id.
 * 但是createrId和modifierId肯定是User的Id.
 * 
 * @author woj
 * 
 */
@APart(name = Assign.SKILL_NAME)
public class Assign extends PartBase {

	public final static String SKILL_NAME = "Assign";

	@AProperty(fullTextConfig="{enable:true}")
	private String assignedId;
	@AProperty
	private String createrId;
	@AProperty
	private String modifierId;

	/**
	 * 设置指派id.可能是User的id,也可能是Group的Id,也有可能是Role的id.
	 * 
	 * @param assignedId
	 */
	public void setAssignedId(String assignedId) {
		this.assignedId = assignedId;
	}

	/**
	 * 获取指派id.可能是User的id,也可能是Group的Id,也有可能是Role的id.
	 * 
	 * @return
	 */
	public String getAssignedId() {
		return assignedId;
	}

	/**
	 * 设置创建者id
	 * 
	 * @param createrId
	 */
	public void setCreaterId(String createrId) {
		this.createrId = createrId;
	}

	/**
	 * 获取创建者Id.User类的id
	 * 
	 * @return
	 */
	public String getCreaterId() {
		return createrId;
	}

	/**
	 * 设置修改者id.User类的id
	 * 
	 * @param modifierId
	 */
	public void setModifierId(String modifierId) {
		this.modifierId = modifierId;
	}

	/**
	 * 获取修改者id.User类的id
	 * 
	 * @return
	 */
	public String getModifierId() {
		return modifierId;
	}

	@Override
	public String getSkillName() {
		return SKILL_NAME;
	}
}
